function validateEmail(email: string) {
    const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
    return emailRegex.test(email);
}

function isValidUsername(name: string) {
    const pattern = /[\u4e00-\u9fa5]/; // 匹配中文字符
    return pattern.test(name);
}